Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Language Guide / Part 3 - Appendixes
Appendix A - The Language at a Glance


Operators

Table A-4 summarizes the operators in the AppleScript English language dialect. The first column lists the operators. The second column shows
the syntax for using the operators in expressions. The placeholders in the
syntax descriptions correspond to AppleScript value classes, which are described briefly in the last section of this appendix, and in more detail in
Chapter 3, "Values."

Synonyms are listed in groups. The table shows the syntax for the first operator, but operators that are synonyms follow the same syntax rules.
Operators
OperatorSyntax
Arithmetic operators 
*number * number
+number + number
date
+ number
-number - number
date
- number
date
- date
÷
/
number ( ÷ | / ) number
^number ^ number
divnumber div number
modnumber mod number
Logical operators 
andBoolean and Boolean
notnot Boolean
orBoolean or Boolean
Containment operators 
start[s] with
begin[s] with
list starts with list
string
starts with string
end[s] withlist ends with list
string
ends with string
containslist contains list
record
contains record
string
contains string
does not contain
doesn't contain
list does not contain list
record
does not contain record
string
does not contain string
 
is in
is contained by
list is in list
record
is in record
string
is in string
is not in
is not contained by
isn't contained by
list is not in list
record
is not in record
string
is not in string
Comparison operators (equality and inequality)
=
equal
equals
equal to
is
is equal to
expression = expression

does not equal
doesn't equal
is not
is not equal [to]
isn't
isn't equal [to]
expression expression
Comparison operators (precedence) 
<
comes before
is less than
is not greater than or equal [to]
isn't greater than or equal [to]
less than
date < date
integer
< integer
real
< real
string
< string
>
comes after
greater than
is greater than
is not less than or equal [to]
isn't less than or equal [to]
date > date
integer
> integer
real
> real
string
> string
 

<=
does not come after
doesn't come after
is less than or equal [to]
is not greater than
isn't greater than
less than or equal [to]
date date
integer
integer
real
real
string
string

>=
does not come before
doesn't come before
greater than or equal [to]
is greater than or equal [to]
is not less than
isn't less than
date date
integer
integer
real
real
string
string
Miscellaneous operators 
&expression & expression
asexpression as className
a reference to[a] ( ref [to] | reference to ) ÿ
reference


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996